grammar ADVPL;
options
{
	backtrack=true;
	output=AST;
}
tokens
{
	FUNCTION; TYPE_FUNCTION; RETURN; LOCAL; 

}
start 	:	 statment;

FUNCTION 
	:	'function';

TYPE_FUNCTION
	:	'user'|'static'|'project';
	
RETURN	:	
		'return';

LOCAL	:	
		'local';
statment 
	:	function_def;		
function_def
	:	(TYPE_FUNCTION) FUNCTION ID '(' ')' bodyfunction RETURN;
bodyfunction 
	:	variable_delc;


variable_delc
	:	LOCAL ID ;

ID  :   ('a'..'z'|'A'..'Z')+ ;

INT :   '0'..'9'+ ;
NEWLINE:'\r'? '\n' ;
WS  :   (' '|'\t')+ {skip();} ;
